package com.joplus.housekeeper.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by zisheng on 2017/8/25.
 */

public class AdvertismentBean {

    /**
     * code : 2000
     * data : {"sid":"1","title":"爱马仕","showType":0,"coverKey":"integration/product/169a28bd23a84b3790e217e4e41abb22/cover","gotoType":1,"category":null,"content":"http://r.xiumi.us/board/v5/1ZdUC/37172229","status":true,"createdDatetime":1503490261000,"updatedDatetime":null,"cover":"http://joplus-images.oss-cn-shanghai.aliyuncs.com/integration/product/169a28bd23a84b3790e217e4e41abb22/cover"}
     * message : 启动广告
     */

    private String code;
    private DataBean data;
    private String message;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public DataBean getData() {
        return data;
    }

    public void setData(DataBean data) {
        this.data = data;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public static class DataBean implements Parcelable {
        /**
         * sid : 1
         * title : 爱马仕
         * showType : 0
         * coverKey : integration/product/169a28bd23a84b3790e217e4e41abb22/cover
         * gotoType : 1
         * category : null
         * content : http://r.xiumi.us/board/v5/1ZdUC/37172229
         * status : true
         * createdDatetime : 1503490261000
         * updatedDatetime : null
         * cover : http://joplus-images.oss-cn-shanghai.aliyuncs.com/integration/product/169a28bd23a84b3790e217e4e41abb22/cover
         */

        private String sid;
        private String title;
        private String showType;
        private String coverKey;
        private String gotoType;
        private String category;
        private String content;
        private boolean status;
        private long createdDatetime;
        private long updatedDatetime;
        private String cover;

        public String getSid() {
            return sid;
        }

        public void setSid(String sid) {
            this.sid = sid;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getShowType() {
            return showType;
        }

        public void setShowType(String showType) {
            this.showType = showType;
        }

        public String getCoverKey() {
            return coverKey;
        }

        public void setCoverKey(String coverKey) {
            this.coverKey = coverKey;
        }

        public String getGotoType() {
            return gotoType;
        }

        public void setGotoType(String gotoType) {
            this.gotoType = gotoType;
        }

        public String getCategory() {
            return category;
        }

        public void setCategory(String category) {
            this.category = category;
        }

        public String getContent() {
            return content;
        }

        public void setContent(String content) {
            this.content = content;
        }

        public boolean isStatus() {
            return status;
        }

        public void setStatus(boolean status) {
            this.status = status;
        }

        public long getCreatedDatetime() {
            return createdDatetime;
        }

        public void setCreatedDatetime(long createdDatetime) {
            this.createdDatetime = createdDatetime;
        }

        public long getUpdatedDatetime() {
            return updatedDatetime;
        }

        public void setUpdatedDatetime(long updatedDatetime) {
            this.updatedDatetime = updatedDatetime;
        }

        public String getCover() {
            return cover;
        }

        public void setCover(String cover) {
            this.cover = cover;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.sid);
            dest.writeString(this.title);
            dest.writeString(this.showType);
            dest.writeString(this.coverKey);
            dest.writeString(this.gotoType);
            dest.writeString(this.category);
            dest.writeString(this.content);
            dest.writeByte(this.status ? (byte) 1 : (byte) 0);
            dest.writeLong(this.createdDatetime);
            dest.writeLong(this.updatedDatetime);
            dest.writeString(this.cover);
        }

        public DataBean() {
        }

        protected DataBean(Parcel in) {
            this.sid = in.readString();
            this.title = in.readString();
            this.showType = in.readString();
            this.coverKey = in.readString();
            this.gotoType = in.readString();
            this.category = in.readString();
            this.content = in.readString();
            this.status = in.readByte() != 0;
            this.createdDatetime = in.readLong();
            this.updatedDatetime = in.readLong();
            this.cover = in.readString();
        }

        public static final Parcelable.Creator<DataBean> CREATOR = new Parcelable.Creator<DataBean>() {
            @Override
            public DataBean createFromParcel(Parcel source) {
                return new DataBean(source);
            }

            @Override
            public DataBean[] newArray(int size) {
                return new DataBean[size];
            }
        };
    }
}
